package cn.wolfcode.crm.mapper;

import cn.wolfcode.crm.domain.Role;
import cn.wolfcode.crm.query.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface RoleMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Role entity);

    Role selectByPrimaryKey(Long id);

    List<Role> selectAll();

    int updateByPrimaryKey(Role entity);

    int query4Count(QueryObject qo);

    List<?> query4List(QueryObject qo);

    void deletePermissionByRoleId(Long id);

    void insertPermissionByRoleId(@Param("permissionId") Long PermissionId ,@Param("RoleId") Long RoleId);

    void deleteEmployeeByRole(Long id);

    List<Long> selectRoleIdByEmpId(Long id);

    List<String> selectRolesByEmpId(Long id);
}